package com.guiguli.interesting;

import java.awt.*;
import java.awt.event.KeyEvent;
import java.util.Scanner;

public class interestingDemo1 {
    public static void main(String[] args) throws AWTException {
        Scanner sc = new Scanner(System.in);
        var n =sc.nextInt();//重复发送次数
        func(n);//重复发送剪贴板的数据
    }
    public static void func(int n) throws AWTException {
        Robot robot = new Robot();
        robot.delay(5000);//等待5000毫秒打开对话框
        for (int i = 0; i < n; i++) {
            robot.keyPress(KeyEvent.VK_CONTROL);//模拟鼠标Ctrl
            robot.keyPress(KeyEvent.VK_V);//模拟鼠标V
            robot.keyRelease(KeyEvent.VK_CONTROL);//松开
            robot.delay(100);//停顿
            robot.keyPress(KeyEvent.VK_ENTER);//模拟鼠标按下Enter
            robot.delay(10);
        }
    }
}
